The present invention relates to the field of making computer applications secure.
The invention applies more particularly to making computer applications secure when the executable or interpretable code might be modified fraudulently, e.g. by fault injection.
The invention applies in particular but in non-limiting manner to protecting applications hosted in a smart card.
In the field of smart cards in particular, fault injection attacks are known that consist in physically disturbing the component, e.g. by using a laser, so as to modify either the code while it is being executed, or else the value of variables being manipulated, where such manipulations make it possible to reach a security breach.
Fault injection attacks seek to change the environment of an embedded circuit so as to modify its behavior, or to insert faults into the instructions that it executes. This may be done for example by disturbing the power supply voltage of the circuit, or by varying its temperature, e.g. using a source of concentrated light aimed on one of its data buses, or by using an electromagnetic source.
Fault injection attacks performed on embedded circuits generally seek to skip a clock of code made up of at least one instruction without executing it. Alternatively, such attacks seek to replace a block of code with at least one so-called “NOP” instruction. Alternatively, such attacks seek to replace the value of at least one parameter for an instruction.
A fault injection attack can have the effect of giving access to a memory register, e.g. a register containing a sensitive resource such as cryptographic keys, or of executing a block of at least one instruction that would otherwise require an access right when no attack is made.
Document US 2011/0126288 discloses a method seeking to detect vulnerabilities in software, to determine whether the vulnerabilities can be corrected, and if so, to correct the vulnerabilities in order to generate code that is secure.
Although that method is most advantageous, it is not suitable for countering attacks that have effects that are difficult to predict.